package common;

public class Def{
	// for ME schemes 
	public static final byte ME_TOKENLESS = 0x10;
	public static final byte ME_TOKEN = 0x11;
	
	// for ME operations
	public static final int ME_OPR_READONLY = 0x100;
	public static final int ME_OPR_WRITE = 0x101;
	public static final long ME_NULL = 0x00;
	
	// for Messages
	// communication (0x00~)
	public static final int NAK = 0x00;
	public static final int ACK = 0x01;
	public static final int MSG = 0x02;	// simple message (just transmitting a string)
	public static final int LS = 0x03;
	public static final int GLS = 0x04;
	
	// mutual exclusion (0x100~)
	public static final int REQUEST_READ = 0x100;
	public static final int REQUEST_WRITE = 0x101;
	public static final int GRANT = 0x102;
	public static final int CSFREE = 0x103;
	public static final int TOKEN = 0x104;
	public static final int TOKENLOST = 0x105;
	public static final int TOKENREGEN = 0x106;
	public static final int REQUEST_ACK = 0x107;
	public static final int REQUEST_TOKEN = 0x110;
	public static final int HOLDER = 0x111;
	public static final int GARBLE = 0x112;
	public static final int TOKENRET = 0x113;
	public static final int TOKENINIT = 0x114;
	public static final int QUEUE = 0x115;
	
	// network (0x200~)
	public static final int PING = 0x200;
	public static final int DROP = 0x201;	// announcing a node left or is disappear
	public static final int KILL = 0x202;	// suggest to die :\
	public static final int DISCON = 0x203;// disconnect only the network
	public static final int TERMINATE = 0x204;
	public static final int JOIN = 0x205;
	public static final int ANNOUNCE = 0x206;
	
	// for general purposes
	public static final int BROADCAST = -0x01;
	public static final int NOT_ASSIGNED = -0x02;
	public static final int JUNK = -0x02;
	
	
	
	// console - for Utils.print_log() function
	public static final byte STDOUT = 0x01;
	public static final byte STDERR = 0x02;
}

